<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <title>Title</title>
    <script src='../lib/ol4/ol4.js'></script>
    <!--    <script src='../lib/ol6.4.3/ol.js'></script>-->
    <!--    <script src='../lib/ol6.12.0/ol.js'></script>-->
    <link rel='stylesheet' href='../css/ol4/ol.css'>
    <link rel='stylesheet' href='../css/main.css'>
</head>
<body>
<div id='map' style='width: 100%'></div>
<script>
	// Open Street Map 地图层
	var openStreetMapLayer = new ol.layer.Tile({
		source: new ol.source.XYZ({
			url: 'http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png',
			wrapX: false
		})
	});

	// 创建地图
	var map = new ol.Map({
		layers: [
			openStreetMapLayer
		],
		view: new ol.View({
			// 设置成都为地图中心
			center: [104.06, 30.67],
			projection: 'EPSG:4326',
			zoom: 1
		}),
		target: 'map'
	});
</script>
</body>
</html>